package com.java.base.exercise.funcationinterface;


import java.util.function.Function;

/**
 * java 8 【Function 数据类型转换函数】
 */
public class ConvertFunction {


    public static Integer StringToIntegerConvert(String value, Function<String, Integer> convert) {

        return convert.apply(value);

    }


    public static void main(String[] args) {

        String stringParameter = "666";

        Integer integer = StringToIntegerConvert(stringParameter, s -> Integer.parseInt(stringParameter) + 222);

        System.out.println("数据类型转换函数；；；" + integer);


    }


}
